<?php
 $token=$_GET["token"]; 

$host = 'marlonpacheco.com.br'; 
 
$header=""; 
$header = "GET /accounts/OAuthGetRequestToken?scope=https%3A%2F%2Fwww.google.com%2Fm8%2Ffeeds%2F HTTP/1.1\r\n"; 
$header =$header ."Host: \r\n"; 
$header =$header ."Accept: text/html, text/xml,image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n"; 
$header =$header ."Authorization: OAuth oauth_version='1.0', oauth_nonce='05650667693c22349a039c430d7b4ef8', oauth_timestamp='1309799526', oauth_consumer_key='marlonpacheco.com.br', oauth_callback='http%3A%2F%2Fmarlonpacheco.com.br%2Fauthsub%2F', oauth_signature_method='HMAC-SHA1', oauth_signature=$token";
//$header =$header ."Authorization: AuthSub token='$token'\r\n"; 
$header =$header ."Content-type: application/x-www-form-urlencoded\r\n"; 

$header =$header ."Connection: keep-alive\r\n"; 
echo $header; 
$fp = fsockopen( $host, 80, $errno, $errstr, 60); 
if( $fp )  
{ 
fputs($fp,$header); 

    $result = ''; 

    while( !feof( $fp ) ) { 
        $result =$result . fgets( $fp, 1024 );} 
        
    fclose ($fp); 
}  echo $result."error:$errno errorstr :$errstr";  
?>